2.5 Creating and managing virtual hard disks for Hyper-V
You can use Disk Management to create, attach, and detach virtual
hard disks. To create a virtual hard disk, choose Create VHD from the
Action menu. In the Create And Attach Virtual Hard Disk dialog box,
shown in Figure 14,
tap or click Browse. Use the Browse Virtual Disk Files dialog box to
select the location where you want to create the .vhd file for the
virtual hard disk. Next type a name for the virtual hard disk, and then
tap or click Save.
In the Virtual Hard Disk Size list, enter the size of the disk in MB,
GB, or TB. Keep in mind disk sizes aren’t necessarily fixed.
Next, chose a virtual hard disk format. Two virtual hard disk formats are available:
-
Standard virtual disks with the .vhd extension, which are backward
compatible with earlier releases of Windows Server and support a maximum
disk size of 2040 GBs.
-
Enhanced virtual disks with the .vhdx extension, which are compatible
only with Windows Server 2012 and support enhanced features, including a
maximum size of 64 TBs and improved handling of power failures.
Use the Virtual Hard Disk Type options to specify whether the size of
the VHD dynamically expands to its fixed maximum size as data is saved
to it or uses a fixed amount of space regardless of the amount of data
stored on it. When you tap or click OK, Disk Management creates the virtual hard disk.
The VHD is attached automatically and added as a new disk. To
initialize the disk for use, press and hold or right-click the disk
entry in Graphical View and then tap or click Initialize Disk. In the
Initialize Disk dialog box, shown in Figure 15, the disk is selected for initialization. Specify the disk type as MBR or GPT, and then tap or click OK.
After initializing
the disk, press and hold or right-click the unpartitioned space on the
disk and create a volume of the appropriate type. After you create the
volume, the VHD is available for use.
After you create, attach, initialize, and format a VHD, you can work
with a virtual disk in much the same way as you work with other disks.
You can write data to and read data from a VHD. You can boot the
computer from a VHD. You are able to take a VHD offline or put a VHD
online by pressing and holding or right-clicking the disk entry in
Graphical View and selecting Offline or Online, respectively. If you no
longer want to use a VHD, you can detach it by pressing and holding or
right-clicking the disk entry in Graphical View, selecting Detach VHD,
and then tapping or clicking OK in the Detach Virtual Hard Disk dialog
box.
You can use VHDs created with other programs as well. If you created a
VHD using another program or have a detached VHD you want to attach,
you can work with the VHD by completing the following steps:
-
In Disk Management, tap or click the Attach VHD option on the Action menu.
-
In the Attach Virtual
Hard Disk dialog box, tap or click Browse. Use the Browse Virtual Disk
Files dialog box to select the .vhd or .vhdx file for the virtual hard
disk, and then tap or click Open.
-
If you want to attach the VHD in read-only mode, select Read-Only.
Otherwise, the VHD will open in read-write mode. Tap or click OK to
attach the VHD.
2.6 Converting FAT or FAT32 to NTFS
On both MBR and GPT disks, you can convert FAT or FAT32 partitions, logical drives, and volumes to NTFS by using the Convert
command. This preserves the file and directory structure without the
need to reformat. Before you use Convert, you should check to see
whether the volume is being used as the active boot volume or is a
system volume containing the operating system. If it is a system volume,
Convert must have exclusive access to the volume before it can begin
the conversion. Because exclusive access to boot or system volumes can
be obtained only during startup, you will see a prompt asking if you
want to schedule the drive to be converted the next time the system
starts.
As part of the preparation for conversion, you should check to see if
there’s enough free space to perform the conversion. You’ll need a
block of free space that’s about 25 percent of the total space used by
the volume. For example, if the volume stores 12 GBs of data, you should
have about 3 GBs of free space. Convert checks for this free space
before running, and if there isn’t enough, it won’t convert the volume.
Caution
Conversion is one-way only. You can convert only from FAT or FAT32 to
NTFS. You can’t convert from NTFS to FAT or NTFS to FAT32 without
deleting the volume and re-creating it using FAT or FAT32. You can’t
convert exFAT or ReFS volumes to NTFS.
You run Convert at the command line. Its syntax is as follows:
convert volume
/FS:NTFS
Here, volume is the
drive letter followed by a colon, drive path, or volume name. So, for
instance, if you want to convert the E drive to NTFS, type convert e: /fs:ntfs.
This starts Convert. As shown in the following example, Convert checks
the current file-system type and then prompts you to enter the volume
label for the drive:
The type of the file system is FAT32.
Enter current volume label for drive E:
As long as you enter the correct volume label, Convert will continue as shown in the following example:
Volume CORPDATA created 4/10/2014 12:53 PM
Volume Serial Number is AA6B-CEDE
Windows is verifying files and folders...
File and folder verification is complete.
Windows has checked the file system and found no problems.
91,827,680 KB total disk space.
91,827,672 KB are available.
8,192 bytes in each allocation unit.
11,478,460 total allocation units on disk.
11,478,459 allocation units available on disk.
Determining disk space required for file system conversion...
Total disk space: 91927860 KB
Free space on volume: 91929680 KB
Space required for conversion: 12080460 KB
Converting file system
Conversion complete
Here, Convert examines the file and folder structure and then
determines how much disk space is needed for the conversion. If there is
enough free space, Convert performs the conversion. Otherwise, it exits
with an error, stating there isn’t enough free space to complete the
conversion.
Several additional parameters are available as well, including /v, which tells Convert to display detailed information during the conversion, and /x,
which tells Convert to force the partition or volume to dismount before
the conversion if necessary. You can’t dismount a boot or system
drive—these drives can be converted only when the system is restarted.
On converted boot and system volumes, Convert applies the same
default security as that applied during Windows setup. On other volumes,
Convert sets security so that the Users group has access but doesn’t
give access to the special group Everyone. If you don’t want security to
be set, you can use the /Nosecurity
parameter. This parameter tells Convert to remove all security
attributes and make all files and directories on the disk accessible to
the group Everyone. In addition, you can use the /Cvtarea parameter to set the name of a contiguous file in the root directory to be a placeholder for NTFS system files.
2.7 Working with removable disks
Removable is the standard disk type associated with removable storage devices. Working with removable disks is similar to working with fixed disks. Removable
storage devices can be formatted with exFAT, FAT16, FAT32, or NTFS.
Although all current versions of the Windows operating system support
exFAT with removable storage devices as well, Windows XP and earlier
versions do not.
The exFAT file system is the next-generation file
system in the FAT (FAT12/16, FAT32) family. exFAT is essentially FAT64.
Although it retains the ease-of-use advantages of FAT32, exFAT
overcomes FAT32’s 4-GB file size limit and FAT32’s 32-GB partition size
limit on Windows systems. exFAT also supports allocation unit sizes of
up to 32,768 KBs. exFAT is designed so that it can be used with and
easily moved between any compliant operating system or device.
Note
Windows Vista and later support hot-pluggable media that use NTFS
volumes. This feature allows you to format USB flash devices and other
similar media with NTFS.
Removable disks support network file and folder sharing. You configure sharing on
removable disks in the same way you configure standard file sharing.
You can assign share permissions, configure caching options for offline
file use, and limit the number of simultaneous users. You can share an
entire removable disk as well as individual folders stored on the
removable disk. You can also create multiple share instances.
Removable disks differ from standard NTFS sharing in that there isn’t
an extensive underlying security architecture. With exFAT, FAT, or
FAT32, the folders and files stored have only basic attributes,
including read-only and hidden attribute flags that you can set, as well
as basic permissions for read and read/write access for specific users.